<?php

namespace App\Models;

use App\User;

class Order extends Model
{
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }

    public function getProductAttribute($value)
    {
        return json_decode($value, true);
    }
}
